﻿<%@ Page Title="Flt. Route" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FltRoute.aspx.cs" Inherits="IFD2.FltRoute" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <link href="Datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>

    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" Text="Flight:" meta:resourcekey="Flight"></asp:Label>
                <asp:Label ID="lblAirline" runat="server" Font-Bold="true"></asp:Label>
                <asp:Label ID="lblFltNo" runat="server" Font-Bold="true"></asp:Label>
            </div>
            <div class="form-group">
                <asp:Label ID="Label2" runat="server" Text="Date:" meta:resourcekey="Date"></asp:Label>
                <asp:Label ID="lblFltDate" runat="server" Font-Bold="true"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_flt_get_route_info" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                                <asp:ControlParameter ControlID="lblFltNo" Name="flt_no" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="lblFltDate" Name="flt_date" PropertyName="Text" Type="DateTime" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" style="min-width:700px;width:100%;" class="table-hover">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input name="KEY" type="radio" value='<%# Eval("airport") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="airport" HeaderText="airport" SortExpression="airport"  meta:resourcekey="airport" />
                                <asp:BoundField DataField="arr_time" HeaderText="arr_time" SortExpression="arr_time"  meta:resourcekey="arr_time" />
                                <asp:BoundField DataField="dep_time" HeaderText="dep_time" SortExpression="dep_time"  meta:resourcekey="dep_time" />
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </div>
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label><br />
                    <div class="well well-sm">
                        <div class="form-group">
                        <asp:Label ID="Label3" runat="server" Text="Date Diff.:" meta:resourcekey="DateDiff"></asp:Label>
                        <asp:DropDownList ID="lstDateDiff" runat="server">
                            <asp:ListItem>-1</asp:ListItem>
                            <asp:ListItem Selected="True">0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                        </asp:DropDownList>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label4" runat="server" Text="Time(Nature):" meta:resourcekey="Time"></asp:Label>
                        <asp:TextBox ID="txtTime" CssClass="form_time" runat="server" MaxLength="5" Width="55px"></asp:TextBox>HH:MM
                        </div>
                        <asp:Button ID="btnSetArrTime" runat="server" Text="Set Arr. Time" OnClick="btnSetArrTime_Click"  meta:resourcekey="SetArrTime" CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnSetDepTime" runat="server" Text="Set Dep. Time" OnClick="btnSetDepTime_Click"  meta:resourcekey="SetDepTime" CssClass="btn btn-sm btn-default" />
                    </div>
                </div>
            </div>
        </div>
    </div>

    </div>
    </ContentTemplate></asp:UpdatePanel>
    </form>

    <script src="Datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //$('.form_datetime').datetimepicker({
            //    format: 'yyyy-m-d hh:ii',
            //    weekStart: 1,
            //    todayBtn: 1,
            //    autoclose: 1,
            //    todayHighlight: 1,
            //    startView: 'month',
            //    forceParse: 0,
            //    showMeridian: 0
            //});
            //$('.form_date').datetimepicker({
            //    format: 'yyyy-m-d',
            //    weekStart: 1,
            //    todayBtn: 1,
            //    autoclose: 1,
            //    todayHighlight: 1,
            //    startView: 'month',
            //    minView: 'month',
            //    forceParse: 0
            //});
            $('.form_time').datetimepicker({
                format: 'hh:ii',
                weekStart: 1,
                todayBtn: 1,
                autoclose: 1,
                todayHighlight: 1,
                startView: 'day',
                minView: 'hour',
                maxView: 'day',
                forceParse: 0
            });
        });
    </script>

</asp:Content>
